<?php
namespace app\admin\controller;

use app\common\controller\Back;

class Index extends Back
{
    protected function initialize()
    {
        parent::initialize();
    }
    
    public function index()
    {
        $this->assign($this->site);
        
        return $this->fetch();
    }

    public function version()
    {
        $version = json_decode(file_get_contents('http://hao.daicuo.cc/douyintool/version'),true);
        if($version['last'] == config('app.app_version')){
            $version = ['last'=>config('app.app_version'),'url'=>''];
        }
        $this->success('ok','admin/index/index',$version);
    }
}